package com.h6.crm.util.pojo.vo;

import java.math.BigDecimal;
import java.util.Date;

import org.springframework.format.annotation.DateTimeFormat;

import com.fasterxml.jackson.annotation.JsonFormat;

import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

@Schema(description = "保存合同信息实体")
@Data
public class SaveContractVO {

    Long id;

    @Schema(description = "项目不能为空", requiredMode = RequiredMode.REQUIRED)
    @NotNull(message = "项目不能为空")
    Long projectId;

    @Schema(description = "客户名")
    String clientName;

    @Schema(description = "合同名")
    @NotBlank(message = "合同名不能为空")
    String name;

    @Schema(description = "签约的公司商标ID")
    Long entityId; // 公司商标

    @Schema(description = "合同金额", requiredMode = RequiredMode.REQUIRED)
    @NotNull(message = "合同金额不能为空")
    BigDecimal amount; // 合同金额

    @Schema(description = "签订日期", requiredMode = RequiredMode.REQUIRED)
    @NotNull(message = "签订日期不能为空")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "Asia/Shanghai")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    Date signingDate; // 签订日期

    @Schema(description = "客户合同编号")
    String clientContractCode; // 客户合同编号

    @Schema(description = "付款方式")
    String paymentMethod; // 付款方式

    @Schema(description = "付款状态")
    @NotBlank(message = "付款状态不能为空")
    String paymentStatus; // 付款状态

    @Schema(description = "合同状态")
    @NotBlank(message = "合同状态不能为空")
    String contractStatus; // 合同状态

    @Schema(description = "签约业务员")
    Long salesmanId; // 业务员

    @Schema(description = "备注")
    String remark;

    // @Schema(description = "附件Id")
    // Long attachmentId;

    @Schema(description = "附件路径")
    String attachmentPath;

}
